import { useState, useCallback } from 'react';

export default () => {
  const [loadding, setLoadding] = useState<boolean>(false);
  const show = useCallback(() => setLoadding(true), []);
  const hidden = useCallback(() => setLoadding(false), []);
  return { loadding, show, hidden };
};
